home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gamers Delight 2
/
Gamers Delight 2.iso
/
Aminet
/
game
/
think
/
AmigaGnuChess.lha
/
chess
/
src.lha
/
src
/
amiga
/
draw.h
< prev
next >
Wrap
Text File
|
1992-09-03
|
1KB
|
44 lines
/*
* Pen colors for different objects.
*/
#define BG_PEN 0
#define BLACKPIECE_PEN 1
#define WHITEPIECE_PEN 2
#define OUTLINE_PEN 3
#define BLACKSQUARE_PEN 4
#define WHITESQUARE_PEN 5
#define TEXT_PEN 6
#define INPUT_PEN 7
#define HILITE_PEN 7
#define LEFT_OFFSET 12
#define TOP_OFFSET 8
/* outer-dimensions */
#define SQUARE_WIDTH 40
#define SQUARE_HEIGHT 20
/* inner-dimensions */
#define SQUARE_IWIDTH 39
#define SQUARE_IHEIGHT 19
/* row 0..7, col 0..7 */
/* inner corners */
#define SQUARE_LHS(row,col) (LEFT_OFFSET+col*SQUARE_WIDTH+1)
#define SQUARE_TOP(row,col) (TOP_OFFSET+row*SQUARE_HEIGHT+1)
#define SQUARE_RHS(row,col) (SQUARE_LHS(row,col)+SQUARE_IWIDTH-1)
#define SQUARE_BOTTOM(row,col) (SQUARE_TOP(row,col)+SQUARE_IHEIGHT-1)
/* piece colors */
#define BLACK 0
#define WHITE 1
/* prototypes */
void AmiDrawCoords(int off, int reverse);
void AmiDrawGrid(void);
void AmiToggleSquare(UWORD row, UWORD col);
void AmiFlashSquare(UWORD row, UWORD col);
void AmiDrawSquare(UWORD row, UWORD col);
void AmiDrawSquares(void);
void AmiDrawPiece(UWORD piece, UWORD pccolor, UWORD row, UWORD col);
void AmiDrawBoard(void);